﻿<%@ Page Title="Material" MasterPageFile="~/Site.master" Language="C#" AutoEventWireup="true" CodeBehind="Supply.aspx.cs" Inherits="LuckyLoot.Presentation.SupplyPage" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<div>
<fieldset><legend>Material</legend>
        <label for="supplyName">Material*</label><br />
        <asp:TextBox runat="server" ID="supplyName"  CssClass="k-textbox" ClientIDMode="Static" required></asp:TextBox><br />

        <label for="supplyDescription">Descrição</label><br />
        <asp:TextBox runat="server" ID="supplyDescription" Width="350" ClientIDMode="Static" TextMode="MultiLine" Columns="20" Rows="4"  CssClass="k-textbox"></asp:TextBox><br />
        
        <label for="supplyAcquisitionDate">Aquisição*</label><br />
        <asp:TextBox runat="server" ID="supplyAcquisitionDate" Width="350" ClientIDMode="Static" required></asp:TextBox><span class="k-invalid-msg" data-for="ctl00$MainContent$supplyAcquisitionDate"></span><br />

        <label for="supplyExpirationDate">Data de validade</label><br />
        <asp:TextBox runat="server" ID="supplyExpirationDate" Width="350" ClientIDMode="Static" ></asp:TextBox><br />

        <label for="supplyAmount">Quantidade (de embalagens)</label><br />
        <asp:TextBox runat="server" ID="supplyAmount" Width="350" ClientIDMode="Static" ></asp:TextBox><br />

        <label for="supplyContentAmount">Quantidade (de unidades por embalagem)</label><br />
        <asp:TextBox runat="server" ID="supplyContentAmount" Width="350" ClientIDMode="Static" ></asp:TextBox><br />

        <label for="supplyType">Tipo de material*</label><br />
        <asp:DropDownList runat="server" ID="supplyType" Width="350" ClientIDMode="Static" required></asp:DropDownList><br />

        <label for="supplyMeasureType">Unidade de medida*</label><br />
        <asp:DropDownList runat="server" ID="supplyMeasureType" Width="350" ClientIDMode="Static" required></asp:DropDownList><br /><br />

        
        <asp:Button runat="server" ID="SaveSupply" Text="Salvar" CssClass="k-button" />
        </fieldset>
            <h1><asp:Label ID="suppliesLabel" Visible="false" runat="server" Text="Materiais"></asp:Label></h1>
        <asp:GridView ID="suppliesGrid" Visible="false" ClientIDMode="Static" runat="server" EmptyDataText="-" ></asp:GridView>
    </div>
        <script>
            $(document).ready(function () {

                var currentTime = new Date();
                var month = currentTime.getMonth();
                var day = currentTime.getDate();
                var year = currentTime.getFullYear();

                $("#supplyAcquisitionDate").kendoDatePicker({
                    format: "dd/MM/yyyy",
                    start: "month",
                    depth: "month",
                    min: new Date(1900, 0, 1),
                    max: new Date(year, month, day)
                });

                $("#supplyExpirationDate").kendoDatePicker({
                    format: "dd/MM/yyyy",
                    start: "month",
                    depth: "month"
                });

                $("#supplyAmount").kendoNumericTextBox({
                    format: "#",
                    min: 1,
                    value: 1,
                    upArrowText: "Mais",
                    downArrowText: "Menos"
                });


                $("#supplyContentAmount").kendoNumericTextBox({
                    format: "#",
                    min: 1,
                    value: 1,
                    upArrowText: "Mais",
                    downArrowText: "Menos"
                });

                $("#supplyType").kendoDropDownList();

                $("#supplyMeasureType").kendoDropDownList();

                $("#suppliesGrid").kendoGrid({
                    selectable: true
                });
            });

    </script>
</asp:Content>

